import Layout from '@/layout'

const asyncRoutes = [
  {
    path: '/user',
    name: 'User',
    component: Layout,
    meta: {
      title: '运营商管理',
      icon: 'nav-icon icon-user',
      resourceId: 'route:/web/user-management/',
    },
    children: [
      {
        path: '/user/list',
        name: 'UserList',
        component: () => import('@/views/user/index.vue'),
        meta: {
          title: '运营商管理',
          subject: '运营商',
          resourceId: 'route:/web/user-management/merchant-management/',
        },
      },
      {
        path: '/user/add',
        name: 'UserAdd',
        component: () => import('@/views/user/add'),
        hidden: true,
        meta: {
          title: '新增运营商',
          resourceId: 'route:/web/user-management/merchant-management/', //todo
        },
      },
      {
        path: '/user/edit/:userId',
        name: 'UserEdit',
        component: () => import('@/views/user/edit'),
        hidden: true,
        meta: {
          title: '编辑运营商',
          resourceId: 'route:/web/user-management/merchant-management/', //todo
        },
      },
      {
        path: '/user/detail/:userId',
        name: 'UserDetail',
        component: () => import('@/views/user/detail.vue'),
        hidden: true,
        meta: {
          title: '运营商详情',
          activeMenu: '/user',
          resourceId:
            'route:/web/user-management/merchant-management/merchantDetail/',
          key: (route) => `${route.params.userId}`,
        },
      },
      {
        path: '/user/wxPay/:id',
        name: 'UserWxPay',
        component: () => import('@/views/user/wxPay.vue'),
        hidden: true,
        meta: {
          title: '小微商户进件',
          resourceId:
            'route:/web/user-management/merchant-management/micro-merchant-applyment/',
          activeMenu: '/user',
          key: (route) => `${route.params.id}`,
        },
      },
      {
        path: '/user/alipayPay',
        name: 'UserAlipayPay',
        component: () => import('@/views/user/alipayPay.vue'),
        hidden: true,
        meta: {
          title: '支付宝商户进件',
          resourceId: 'route:/web/user-management/', //todo
        },
      },
      {
        path: '/user/unionpayAccountInfo',
        name: 'UserUnionpayAccountInfo',
        component: () => import('@/views/user/unionpayAccountInfo.vue'),
        hidden: true,
        meta: {
          title: '结算账户信息',
          resourceId: 'route:/web/user-management/merchant-management/', //todo
        },
      },
      {
        path: '/user/unionpayStoreInfo',
        name: 'UserUnionpayStoreInfo',
        component: () => import('@/views/user/unionpayStoreInfo.vue'),
        hidden: true,
        meta: {
          title: '门店信息',
          resourceId: 'route:/web/user-management/merchant-management/', //todo
        },
      },
      {
        path: '/user/unionpayContractInfo',
        name: 'UserUnionpayContractInfo',
        component: () => import('@/views/user/unionpayContractInfo.vue'),
        hidden: true,
        meta: {
          title: '合同信息',
          resourceId: 'route:/web/user-management/merchant-management/', //todo
        },
      },
      {
        path: '/user/appUserList',
        name: 'AppUserList',
        component: () => import('@/views/user/appUserList.vue'),
        meta: {
          title: '用户管理',
          resourceId: 'route:/web/user-management/user-management/',
        },
      },
      {
        path: '/user/UserPackageDetail/:id',
        name: 'UserPackageDetail',
        component: () => import('@/views/user/UserPackageDetail.vue'),
        hidden: true,
        meta: {
          title: '用户套餐详情',
          resourceId: 'route:/web/user-management/user-management/card-detail/',
          key: (route) => `${route.params.id}`,
        },
      },
      {
        path: '/user/staffList',
        name: 'StaffLIst',
        component: () => import('@/views/user/staffList.vue'),
        meta: {
          title: '员工管理',
          resourceId: 'route:/web/user-management/staff-management/',
        },
      },
      {
        path: '/user/insertMerchantPartner',
        name: 'InsertMerchantPartner',
        component: () => import('@/views/user/insertMerchantPartner.vue'),
        meta: {
          title: '分账人管理',
          resourceId: 'route:/web/user-management/staff-management/',
        },
      },
      {
        path: '/user/partnerList',
        name: 'PartnerList',
        component: () => import('@/views/user/partnerList.vue'),
        meta: {
          title: '合作方管理',
          resourceId: 'route:/web/user-management/partnerList', //todo
        },
      },
      {
        path: '/user/relationStation/:id',
        name: 'RelationStation',
        component: () => import('@/views/user/relationStation.vue'),
        hidden: true,
        meta: {
          title: '关联电站',
          resourceId:
            'route:/web/user-management/staff-management/link-station/',
          key: (route) => `${route.params.id}`,
        },
      },
      {
        path: '/user/whiteList',
        name: 'WhiteList',
        component: () => import('@/views/user/whiteList.vue'),
        meta: {
          title: '充电白名单',
          resourceId: 'route:/web/user-management/chargewhitelist-management/',
        },
      },
      {
        path: '/user/applyReviewList',
        name: 'UserApplyReviewList',
        component: () => import('@/views/user/applyReviewList.vue'),
        meta: {
          title: '审核管理',
          resourceId: 'route:/web/user-management/verify-management/',
        },
      },
      {
        path: '/user/applyReviewManage/:id',
        name: 'UserApplyReviewManage',
        component: () => import('@/views/user/applyReviewManage.vue'),
        hidden: true,
        meta: {
          title: '账户审核',
          activeMenu: '/user',
          resourceId:
            'route:/web/user-management/verify-management/applyDetail-management/',
          key: (route) => `${route.params.id}`,
        },
      },
    ],
  },
]

export default asyncRoutes
